package com.ww.scm.valueObject.dic;

import org.apache.commons.lang.StringUtils;

import com.ww.scm.entity.pub.Dictionary;
import com.ww.scm.service.DictionaryManager;
import com.ww.scm.valueObject.ValueObject;


public class DictionaryVo extends ValueObject {
	

	//编号
	private String code;
	//名称
	private String name;
	//类型
	private String typeId;
	private String typeName;
	private String parentId;
	private String other1Id;
	private String other1Name;
	private String other2Id;
	private String other2Name;
	private String other3Id;
	private String other3Name;
	private String other4Id;
	private String other4Name;
	private String other5Id;
	private String other5Name;
	private String other6Id;
	private String other6Name;	
	private String other7Id;
	private String other7Name;	
	private String other8Id;
	private String other8Name;	
	private String other9Id;
	private String other9Name;
	private String other10Id;
	private String other10Name;	

	public DictionaryVo() {
		
	}
	
	public DictionaryVo(Dictionary dictionary,DictionaryManager dictionaryManager) {
		super(dictionary);
		this.code=dictionary.getCode();
		this.name=dictionary.getName();
		this.typeId=dictionary.getType();
		this.parentId=dictionary.getParent();
		String other1=dictionary.getOther1();
		if (StringUtils.isNotBlank(other1)){
			Dictionary entity=dictionaryManager.findDictionary(other1);
			if (entity!=null){
				this.other1Id=entity.getId();
				this.other1Name=entity.getName();
			}
		}
		String other2=dictionary.getOther2();
		if (StringUtils.isNotBlank(other2)){
			Dictionary entity=dictionaryManager.findDictionary(other2);
			if (entity!=null){
				this.other2Id=entity.getId();
				this.other2Name=entity.getName();
			}
		}
		String other3=dictionary.getOther3();
		if (StringUtils.isNotBlank(other3)){
			Dictionary entity=dictionaryManager.findDictionary(other3);
			if (entity!=null){
				this.other3Id=entity.getId();
				this.other3Name=entity.getName();
			}
		}
		String other4=dictionary.getOther4();
		if (StringUtils.isNotBlank(other4)){
			Dictionary entity=dictionaryManager.findDictionary(other4);
			if (entity!=null){
				this.other4Id=entity.getId();
				this.other4Name=entity.getName();
			}
		}
		String other5=dictionary.getOther5();
		if (StringUtils.isNotBlank(other5)){
			Dictionary entity=dictionaryManager.findDictionary(other5);
			if (entity!=null){
				this.other5Id=entity.getId();
				this.other5Name=entity.getName();
			}
		}
		String other6=dictionary.getOther6();
		if (StringUtils.isNotBlank(other6)){
			Dictionary entity=dictionaryManager.findDictionary(other6);
			if (entity!=null){
				this.other6Id=entity.getId();
				this.other6Name=entity.getName();
			}
		}
		String other7=dictionary.getOther7();
		if (StringUtils.isNotBlank(other7)){
			Dictionary entity=dictionaryManager.findDictionary(other7);
			if (entity!=null){
				this.other7Id=entity.getId();
				this.other7Name=entity.getName();
			}
		}
		String other8=dictionary.getOther8();
		if (StringUtils.isNotBlank(other8)){
			Dictionary entity=dictionaryManager.findDictionary(other8);
			if (entity!=null){
				this.other8Id=entity.getId();
				this.other8Name=entity.getName();
			}
		}
		String other9=dictionary.getOther9();
		if (StringUtils.isNotBlank(other9)){
			Dictionary entity=dictionaryManager.findDictionary(other9);
			if (entity!=null){
				this.other9Id=entity.getId();
				this.other9Name=entity.getName();
			}
		}
		String other10=dictionary.getOther10();
		if (StringUtils.isNotBlank(other10)){
			Dictionary entity=dictionaryManager.findDictionary(other10);
			if (entity!=null){
				this.other10Id=entity.getId();
				this.other10Name=entity.getName();
			}
		}
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getOther1Id() {
		return other1Id;
	}

	public void setOther1Id(String other1Id) {
		this.other1Id = other1Id;
	}

	public String getOther1Name() {
		return other1Name;
	}

	public void setOther1Name(String other1Name) {
		this.other1Name = other1Name;
	}

	public String getOther2Id() {
		return other2Id;
	}

	public void setOther2Id(String other2Id) {
		this.other2Id = other2Id;
	}

	public String getOther2Name() {
		return other2Name;
	}

	public void setOther2Name(String other2Name) {
		this.other2Name = other2Name;
	}

	public String getOther3Id() {
		return other3Id;
	}

	public void setOther3Id(String other3Id) {
		this.other3Id = other3Id;
	}

	public String getOther3Name() {
		return other3Name;
	}

	public void setOther3Name(String other3Name) {
		this.other3Name = other3Name;
	}

	public String getOther4Id() {
		return other4Id;
	}

	public void setOther4Id(String other4Id) {
		this.other4Id = other4Id;
	}

	public String getOther4Name() {
		return other4Name;
	}

	public void setOther4Name(String other4Name) {
		this.other4Name = other4Name;
	}

	public String getOther5Id() {
		return other5Id;
	}

	public void setOther5Id(String other5Id) {
		this.other5Id = other5Id;
	}

	public String getOther5Name() {
		return other5Name;
	}

	public void setOther5Name(String other5Name) {
		this.other5Name = other5Name;
	}

	public String getOther6Id() {
		return other6Id;
	}

	public void setOther6Id(String other6Id) {
		this.other6Id = other6Id;
	}

	public String getOther6Name() {
		return other6Name;
	}

	public void setOther6Name(String other6Name) {
		this.other6Name = other6Name;
	}

	public String getOther7Id() {
		return other7Id;
	}

	public void setOther7Id(String other7Id) {
		this.other7Id = other7Id;
	}

	public String getOther7Name() {
		return other7Name;
	}

	public void setOther7Name(String other7Name) {
		this.other7Name = other7Name;
	}

	public String getOther8Id() {
		return other8Id;
	}

	public void setOther8Id(String other8Id) {
		this.other8Id = other8Id;
	}

	public String getOther8Name() {
		return other8Name;
	}

	public void setOther8Name(String other8Name) {
		this.other8Name = other8Name;
	}

	public String getOther9Id() {
		return other9Id;
	}

	public void setOther9Id(String other9Id) {
		this.other9Id = other9Id;
	}

	public String getOther9Name() {
		return other9Name;
	}

	public void setOther9Name(String other9Name) {
		this.other9Name = other9Name;
	}

	public String getOther10Id() {
		return other10Id;
	}

	public void setOther10Id(String other10Id) {
		this.other10Id = other10Id;
	}

	public String getOther10Name() {
		return other10Name;
	}

	public void setOther10Name(String other10Name) {
		this.other10Name = other10Name;
	}

	

}
